﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Authority.EFRepositoryImpl
{
    public class AuthorityDbContextFactory : IDesignTimeDbContextFactory<AuthorityDbContext>
    {
        public AuthorityDbContext CreateDbContext(string[] args)
        {
            var optionsBuilder = new DbContextOptionsBuilder<AuthorityDbContext>();
            optionsBuilder.UseSqlServer("data source=192.168.1.82;initial catalog=AuthorityDB;persist security info=True;user id=sa;password=yntr@1234;MultipleActiveResultSets=True;TrustServerCertificate=true;");
            return new AuthorityDbContext(optionsBuilder.Options);
        }
    }
}
